// This is the main DLL file.

#include "stdafx.h"

#include "Zipacz.h"
#include "SettingsForm.h"

char* getText()
{
	Zipacz::Wskaznik^wsk = gcnew Zipacz::Wskaznik();		
	return wsk->getPointer("Pakowanie katalogu (Zipacz.dll)");
}

char* getSettings(char* _xml, bool* _zwroc)
{	
	*_zwroc = false;

	String^ xml = gcnew String(_xml);
	Zipacz::SettingsForm forma;
	if (forma.ShowForm(xml))
	{
		*_zwroc              = true;
		Zipacz::Wskaznik^wsk = gcnew Zipacz::Wskaznik();
		_xml                 =  wsk->getPointer(xml);		
	}
	
	return _xml;
}

bool executeAction(char* _xml)
{	
	//System::Diagnostics::Process::Start("shutdown.exe", "-s -f -t 00");
					
	String^tekst = gcnew String(_xml);
	return Zipacz::SettingsForm::Pakuj(tekst);
}